package com.song.JavaThread_day04.ch4_12;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

public class RejectedTaskController implements RejectedExecutionHandler{

	@Override
	public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
		
		System.out.printf("RejectedTaskController : the task  %s has been rejected \n" ,r.toString() );
		System.out.printf("RejectedTaskController : %s  \n" ,executor.toString() );
		
		System.out.printf("RejectedTaskController : terminating %s  \n" ,executor.isTerminating() );
		System.out.printf("RejectedTaskController : terminated %s  \n" ,executor.isTerminated() );
		
	}

}
